# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1153.65.14 -> 1.1153.65.15 # include/linux/init.h 1.26 -> 1.27 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/09/08 davidm@tiger.hpl.hp.com 1.1153.65.15 # Mark initcall macros with __attribute_used__ so the definitions do not # get optimized away by the compiler (such as the latest GCC pre-3.4). # -------------------------------------------- # diff -Nru a/include/linux/init.h b/include/linux/init.h --- a/include/linux/init.h Tue Sep 9 01:05:17 2003 +++ b/include/linux/init.h Tue Sep 9 01:05:17 2003 @@ -2,6 +2,7 @@ #define _LINUX_INIT_H #include +#include /* These macros are used to mark some functions or * initialized data (doesn't apply to uninitialized data) @@ -71,15 +72,16 @@ #ifndef __ASSEMBLY__ -/* initcalls are now grouped by functionality into separate +/* initcalls are now grouped by functionality into separate * subsections. Ordering inside the subsections is determined - * by link order. - * For backwards compatibility, initcall() puts the call in + * by link order. + * For backwards compatibility, initcall() puts the call in * the device init subsection. */ -#define __define_initcall(level,fn) \ - static initcall_t __initcall_##fn __attribute__ ((unused,__section__ (".initcall" level ".init"))) = fn +#define __define_initcall(level,fn) \ + static initcall_t __initcall_##fn \ + __attribute_used__ __attribute__ ((__section__ (".initcall" level ".init"))) = fn #define core_initcall(fn) __define_initcall("1",fn) #define postcore_initcall(fn) __define_initcall("2",fn) @@ -95,10 +97,12 @@ static exitcall_t __exitcall_##fn __exit_call = fn #define console_initcall(fn) \ - static initcall_t __initcall_##fn __attribute__ ((unused,__section__ (".con_initcall.init")))=fn + static initcall_t __initcall_##fn \ + __attribute_used__ __attribute__ ((__section__ (".con_initcall.init"))) = fn #define security_initcall(fn) \ - static initcall_t __initcall_##fn __attribute__ ((unused,__section__ (".security_initcall.init"))) = fn + static initcall_t __initcall_##fn \ + __attribute_used__ __attribute__ ((__section__ (".security_initcall.init"))) = fn struct obs_kernel_param { const char *str; @@ -106,10 +110,10 @@ }; /* OBSOLETE: see moduleparam.h for the right way. */ -#define __setup(str, fn) \ - static char __setup_str_##fn[] __initdata = str; \ - static struct obs_kernel_param __setup_##fn \ - __attribute__((unused,__section__ (".init.setup"))) \ +#define __setup(str, fn) \ + static char __setup_str_##fn[] __initdata = str; \ + static struct obs_kernel_param __setup_##fn \ + __attribute_used__ __attribute__((__section__ (".init.setup"))) \ = { __setup_str_##fn, fn } #endif /* __ASSEMBLY__ */